﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Brain;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework;

namespace Demos
{
    public class AvatarTestScreen : DemoScreen
    {
#if XBOX
        public XboxAvatar XboxAvatar;

        public InputFreeCamera3D Camera;

        public AvatarTestScreen()
        {
            // only executes if we're running on an Xbox, else
            // this sample is pointless
            // Gets the first player Gamer Profile
            Gamer gamer = SignedInGamer.SignedInGamers[PlayerIndex.One];
            // Make the avatar with this profile
            if (gamer != null)
            {
                XboxAvatar = new XboxAvatar_Default(gamer, null);
            }
            else
            {
                XboxAvatar = new XboxAvatar_Default();
            }
            XboxAvatar.Rendering = WorldObjectRendering.Rendered;

            // Makes the Sample Camera
            Camera = new InputFreeCamera3D(this);
            Engine.Instance.CameraManager.Camera3D = Camera;

            // Makes a ground box
            WorldObject Ground = new WorldObject("Game//Models//model_box");
            Ground.Scale = new Vector3(10, 1, 10);
            Ground.Position = new Vector3(0, -1, 0);
            Ground.Update();
            Ground.Draw();
            Ground.Rendering = WorldObjectRendering.Rendered;
        }
#endif

    }
}
